package com.oem.fragment.service;

import com.oem.fragment.model.Result;
import com.oem.fragment.model.user.LoginFormDTO;
import com.oem.fragment.model.user.RegisterFormDTO;
import com.oem.fragment.model.user.User;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

public interface UserService {
    @POST("/user/login/username")
    Call<Result> loginWithUsername(@Body LoginFormDTO loginFormDTO);

    @POST("/user/register")
    Call<Result> register(@Body RegisterFormDTO registerFormDTO);

    @GET("/user/list/{id}")
    Call<Result<User>> getUserInfo(@Path("id") Long id);

}

